//
//  Address_bookTableViewCell.m
//  fxxiaoke
//
//  Created by 鞠超 on 16/9/14.
//  Copyright © 2016年 jc. All rights reserved.
//

#import "Address_bookTableViewCell.h"

@implementation Address_bookTableViewCell

- (instancetype )initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if(self)
    {
        [self p_setupView];
    }
    
    return self;
}

- (void )p_setupView
{
    self.image_Select = [[UIImageView alloc] init];
    self.image_Select.image = [UIImage imageNamed:@"checknumber.png"];
    [self.contentView addSubview:self.image_Select];
    
    self.name = [[UILabel alloc] init];
    self.name.textColor = [UIColor blackColor];
    self.name.font = [UIFont systemFontOfSize:17.0f];
    self.name.text = @"@技术中心";
    [self.contentView addSubview:self.name];
    
    //
    self.view_Line = [[UIView alloc] init];
    self.view_Line.backgroundColor = [UIColor groupTableViewBackgroundColor];
    [self.contentView addSubview:self.view_Line];
}

- (void )layoutSubviews
{
    [super layoutSubviews];
    
    self.image_Select.frame = CGRectMake(15, 17.5, 15, 15);
    
    self.name.frame = CGRectMake(CGRectGetMaxX(self.image_Select.frame) + 15, 15, SCREEN_WIDTH - CGRectGetMaxX(self.image_Select.frame) - 25, 20);
    
    self.view_Line.frame = CGRectMake(CGRectGetMinX(self.name.frame), 49, SCREEN_WIDTH - CGRectGetMinX(self.name.frame), 1);
}

@end
